package com.leyou.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leyou.item.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {

    @Select("select tc.* " +
            "from tb_category_brand as tcb,tb_category as tc " +
            "where tcb.category_id = tc.id " +
            "and tcb.brand_id = #{id}")
    List<Category> queryCategoryByBrandId(@Param("id") Long id);
}
